package ch6;

import java.util.Scanner;

public class Zxf5 {
    public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            System.out.print("请输入一个数：");
            int i = 0;
            int b = 0;
            int num = in.nextInt();
            int a=num;
            while (num != 0) {
                i = (num % 10);
                b = b  * 10+i;
                num = num / 10;
            }
            if (a==b){
                System.out.println("是回文数");
        }else {
                System.out.println("不是回文数");
            }
    }

}
